import { getShowOne, getShowUri, getOpenPlusUri } from '../../api/request'
export default {
    namespaced: true,
    // 数据源
    state: {
        showList: [],
        ShowOne: [],
        openPlus: [],
    },
    // 改变状态
    getters: {},
    //  同步设置
    mutations: {
        getShowUri(state, data) {
            state.showList = data
        },
        getShowOne(state, data) {
            state.ShowOne = data
        },
        getOpenPlusUri(state, data) {
            state.openPlus = data
        },
    },
    // 异步请求
    actions: {
        async setShowUri({ commit }) {
            let ret = await getShowUri()
            console.log(ret, 'thx')
            commit('getShowUri', ret.data.data.list)
        },
        async setShowOne({ commit }) {
            let ret = await getShowOne()
                // console.log(ret.data.data,'thx')
            commit('getShowOne', ret.data.data)
        },
        async setOpenPlus({ commit }) {
            let ret = await getOpenPlusUri()
                // console.log(ret)
            commit('getOpenPlusUri', ret.data.data.hot_city_List)
        }
    }

}